<?php
?>
<section class="itq-container">
    <div class="col-lg-12">
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3>Giỏ Hàng</h3>
            </div>
            <!-- /.panel-heading -->
            <div class="panel-body">
                <div class="table-responsive">
                    <table class="table table-striped table-bordered table-hover">
                        <thead>
                        <tr>
                            <th>#</th>
                            <th>Tên Sản Phẩm</th>
                            <th>Số lượng</th>
                            <th>Đơn giá</th>
                            <th> Tạm Tính</th>
                        </tr>
                        </thead>
                        <tbody>
                        <form action="index.php?r=home/payend" method="post">
                            <?php
                            if(isset($cart)){
                                foreach($cart as $key=>$value){
                                    if(is_array($value)){
                                        ?>
                                        <tr>
                                            <td><?php echo $value['id']?></td>
                                            <td><?php echo $value['name']?></td>

                                            <td><?php echo $value['qty']?></td>
                                            <td><?php echo $value['cost']?></td>
                                            <td><?php echo $value['sumcost']?></td>
                                        </tr>
                                    <?php
                                    }
                                }
                            }
                            ?>
                            <tr>
                                <td>tên quý khách:</td>
                                <td><input type="text" name="custom_name" placeholder="Full Name"> </td>
                                <td rowspan="4"><textarea rows="10" cols="50" name="custom_request"> yêu cầu gì khác?</textarea></td>

                            </tr>
                            <tr>
                                <td>email:</td>
                                <td><input type="email" name="custom_email" placeholder="email"> </td>
                            </tr>
                            <tr>
                                <td>số điện thoại:</td>
                                <td><input type="text" name="custom_tel" placeholder="telephonet"> </td>
                            </tr>
                            <tr>
                                <td>Địa Chỉ:</td>
                                <td><input type="text" name="custom_address" placeholder="address"> </td>
                            </tr>
                            <tr>
                                <td>Hình Thức thanh toán:</td>
                                <td><input type="text" name="custom_pay" placeholder="Pay"> </td>
                            </tr>
                            <tr>
                                <td><a href="index.php?r=home/index" class="btn btn-default">quay lại</a> </td>
                                <td></td>
                                <td><input class="btn btn-default" type="submit"  value="Đặt hàng"></td>
                                <td></td>
                                <td>Tổng tiền:<?php echo $cart['count']?> </td>
                            </tr>
                        </form>
                    </table>
                </div>
            </div>
        </div>
    </div>
</section>
<section class="clear"></section>
